19. Hardware Related Commands > 19.7 AT^SSPI   Serial Protocol Interface

19.7
AT^SSPI   Serial Protocol Interface
The AT^SSPI command enables the module to be connected to external I²C or SPI devices.

The I²C/SPI datastream is mapped through an internal I²C/SPI driver to and from an ASCII hex protocol which can be exchanged with an internal application (JAVA) or an external application via V24.

The AT^SSPI write command configures and activates the I²C/SPI interface and changes from command mode into data mode. All values must be given in hexadecimal format (0 - 9, A - F) without "0x". For details on data mode please refer to Section 19.7.3, Transmitting Data over AT Interface.

Caution:
If I²C or SPI data mode is active the DCD line of the connected serial port goes high.
If I²C or SPI are opened from a Java application be sure to close the I²C or SPI channels before Java terminates.
Syntax
Test Command  
Response(s)
^SSPI:(list of supported <basicConfiguration>s), (list of supported <delayOne>s), (list of supported <delayTwo>s), (list of supported <wordLength>s), (list of supported <extendedSpiConfiguration>s)
Read Command  
Response(s)
Write Command  
Response(s)
Reference(s) 
PIN 
ASC0 
ASC1 
USB 
MUX1 
MUX2 
MUX3 
Charge 
Last 

Parameter Description
 
Parameter returned by the AT^SSPI? read command.
Indicates whether or not the I²C or SPI channel is used. When the channel is open and the ME is in data mode, the read command can only be used if one of the remaining interfaces is available. For example, when the chan­nel was opened on ASC0, you can use ASC1 or the MUX channels to check the status.
[0](&F)
Not connected (channel closed). All following parameters are the factory set­tings AT^SSPI=0,0010,0000,0000,0000,0000.
1
Connected (channel open, ME in data mode). All following parameters are the values currently used, for example AT^SSPI=1,0010,FFFF,FFFF,0000,0000.
 
Parameter <basicConfiguration> is a 16 bit word which contains four subparameters to control the follow­ing functions:
 
0
1
0
1

0
1
2
3
4
5
I²C at 100 kbps
I²C at 400 kbps (default)

SPI at 100 kbps
SPI at 250 kbps
SPI at 500 kbps
SPI at 1.083 Mbps
SPI at 3.25 Mbps
SPI at 6.5 Mbps
 
I²C: This parameter specifies a delay after each written byte. See Section 19.7.1, Specifying Delay Time for I²C for further details.
SPI: 0000 only.
[0](&F)...FFFF
Unsigned 16 bit value
 
I²C: This parameter specifies the delay after a each read byte. See Section 19.7.1, Specifying Delay Time for I²C for further details.
SPI: 0000 only.
[0](&F)...FFFF
Unsigned 16 bit value
 
For SPI only:
0
Length of SPI word = 8 bits
 
For SPI only: Parameter <extendedSpiConfiguration> is a 16 bit word which contains four subparameters to control the following functions:
 
0
1
2
3
Four different SPI modes. Phase and polarity of all SPI modes are illustrated in Section 19.7.2, Selecting SPI Mode.
Bit sequence
(arrangement of bits on the SPI)